Integrand size = 28, antiderivative size = 103 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=-\frac {2 a b \cos ^5(c+d x)}{5 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}+\frac {b^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin ^5(c+d x)}{5 d}-\frac {b^2 \sin ^5(c+d x)}{5 d} \]
-2/5*a*b*cos(d*x+c)^5/d+a^2*sin(d*x+c)/d-2/3*a^2*sin(d*x+c)^3/d+1/3*b^2*si n(d*x+c)^3/d+1/5*a^2*sin(d*x+c)^5/d-1/5*b^2*sin(d*x+c)^5/d
Time = 0.18 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.67 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=\frac {-6 a b \cos ^5(c+d x)+15 a^2 \sin (c+d x)+5 \left (-2 a^2+b^2\right ) \sin ^3(c+d x)+3 \left (a^2-b^2\right ) \sin ^5(c+d x)}{15 d} \]
(-6*a*b*Cos[c + d*x]^5 + 15*a^2*Sin[c + d*x] + 5*(-2*a^2 + b^2)*Sin[c + d* x]^3 + 3*(a^2 - b^2)*Sin[c + d*x]^5)/(15*d)
Time = 0.33 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3042, 3569, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^3 (a \cos (c+d x)+b \sin (c+d x))^2dx\) |
\(\Big \downarrow \) 3569 |
\(\displaystyle \int \left (a^2 \cos ^5(c+d x)+2 a b \sin (c+d x) \cos ^4(c+d x)+b^2 \sin ^2(c+d x) \cos ^3(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 \sin ^5(c+d x)}{5 d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {2 a b \cos ^5(c+d x)}{5 d}-\frac {b^2 \sin ^5(c+d x)}{5 d}+\frac {b^2 \sin ^3(c+d x)}{3 d}\) |
(-2*a*b*Cos[c + d*x]^5)/(5*d) + (a^2*Sin[c + d*x])/d - (2*a^2*Sin[c + d*x] ^3)/(3*d) + (b^2*Sin[c + d*x]^3)/(3*d) + (a^2*Sin[c + d*x]^5)/(5*d) - (b^2 *Sin[c + d*x]^5)/(5*d)
3.1.45.3.1 Defintions of rubi rules used
Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*si n[(c_.) + (d_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*(a *cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] && Inte gerQ[m] && IGtQ[n, 0]
Time = 0.97 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.77
method | result | size |
parts | \(\frac {a^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5 d}+\frac {b^{2} \left (-\frac {\sin \left (d x +c \right )^{5}}{5}+\frac {\sin \left (d x +c \right )^{3}}{3}\right )}{d}-\frac {2 a b \cos \left (d x +c \right )^{5}}{5 d}\) | \(79\) |
derivativedivides | \(\frac {\frac {a^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}-\frac {2 a b \cos \left (d x +c \right )^{5}}{5}+b^{2} \left (-\frac {\cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}{5}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{15}\right )}{d}\) | \(88\) |
default | \(\frac {\frac {a^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}-\frac {2 a b \cos \left (d x +c \right )^{5}}{5}+b^{2} \left (-\frac {\cos \left (d x +c \right )^{4} \sin \left (d x +c \right )}{5}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{15}\right )}{d}\) | \(88\) |
risch | \(-\frac {a b \cos \left (d x +c \right )}{4 d}+\frac {5 a^{2} \sin \left (d x +c \right )}{8 d}+\frac {b^{2} \sin \left (d x +c \right )}{8 d}-\frac {a b \cos \left (5 d x +5 c \right )}{40 d}+\frac {\sin \left (5 d x +5 c \right ) a^{2}}{80 d}-\frac {\sin \left (5 d x +5 c \right ) b^{2}}{80 d}-\frac {a b \cos \left (3 d x +3 c \right )}{8 d}+\frac {5 \sin \left (3 d x +3 c \right ) a^{2}}{48 d}-\frac {\sin \left (3 d x +3 c \right ) b^{2}}{48 d}\) | \(143\) |
parallelrisch | \(\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9} a^{2}-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} a b +\frac {8 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3}+\frac {4 \left (29 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15}-8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a b +\frac {8 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {4 a b}{5}}{d \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}\) | \(150\) |
norman | \(\frac {-\frac {4 a b}{5 d}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}+\frac {8 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {8 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}+\frac {4 \left (29 a^{2}-4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15 d}-\frac {8 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{5}}\) | \(170\) |
1/5*a^2/d*(8/3+cos(d*x+c)^4+4/3*cos(d*x+c)^2)*sin(d*x+c)+b^2/d*(-1/5*sin(d *x+c)^5+1/3*sin(d*x+c)^3)-2/5*a*b*cos(d*x+c)^5/d
Time = 0.25 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.72 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=-\frac {6 \, a b \cos \left (d x + c\right )^{5} - {\left (3 \, {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + {\left (4 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} + 8 \, a^{2} + 2 \, b^{2}\right )} \sin \left (d x + c\right )}{15 \, d} \]
-1/15*(6*a*b*cos(d*x + c)^5 - (3*(a^2 - b^2)*cos(d*x + c)^4 + (4*a^2 + b^2 )*cos(d*x + c)^2 + 8*a^2 + 2*b^2)*sin(d*x + c))/d
Time = 0.24 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.34 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=\begin {cases} \frac {8 a^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 a^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} - \frac {2 a b \cos ^{5}{\left (c + d x \right )}}{5 d} + \frac {2 b^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a \cos {\left (c \right )} + b \sin {\left (c \right )}\right )^{2} \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((8*a**2*sin(c + d*x)**5/(15*d) + 4*a**2*sin(c + d*x)**3*cos(c + d*x)**2/(3*d) + a**2*sin(c + d*x)*cos(c + d*x)**4/d - 2*a*b*cos(c + d*x)** 5/(5*d) + 2*b**2*sin(c + d*x)**5/(15*d) + b**2*sin(c + d*x)**3*cos(c + d*x )**2/(3*d), Ne(d, 0)), (x*(a*cos(c) + b*sin(c))**2*cos(c)**3, True))
Time = 0.22 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.75 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=-\frac {6 \, a b \cos \left (d x + c\right )^{5} - {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{2} + {\left (3 \, \sin \left (d x + c\right )^{5} - 5 \, \sin \left (d x + c\right )^{3}\right )} b^{2}}{15 \, d} \]
-1/15*(6*a*b*cos(d*x + c)^5 - (3*sin(d*x + c)^5 - 10*sin(d*x + c)^3 + 15*s in(d*x + c))*a^2 + (3*sin(d*x + c)^5 - 5*sin(d*x + c)^3)*b^2)/d
Time = 0.33 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.11 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=-\frac {a b \cos \left (5 \, d x + 5 \, c\right )}{40 \, d} - \frac {a b \cos \left (3 \, d x + 3 \, c\right )}{8 \, d} - \frac {a b \cos \left (d x + c\right )}{4 \, d} + \frac {{\left (a^{2} - b^{2}\right )} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac {{\left (5 \, a^{2} - b^{2}\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac {{\left (5 \, a^{2} + b^{2}\right )} \sin \left (d x + c\right )}{8 \, d} \]
-1/40*a*b*cos(5*d*x + 5*c)/d - 1/8*a*b*cos(3*d*x + 3*c)/d - 1/4*a*b*cos(d* x + c)/d + 1/80*(a^2 - b^2)*sin(5*d*x + 5*c)/d + 1/48*(5*a^2 - b^2)*sin(3* d*x + 3*c)/d + 1/8*(5*a^2 + b^2)*sin(d*x + c)/d
Time = 21.69 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.12 \[ \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx=\frac {2\,\left (\frac {3\,\sin \left (c+d\,x\right )\,a^2\,{\cos \left (c+d\,x\right )}^4}{2}+2\,\sin \left (c+d\,x\right )\,a^2\,{\cos \left (c+d\,x\right )}^2+4\,\sin \left (c+d\,x\right )\,a^2-3\,a\,b\,{\cos \left (c+d\,x\right )}^5-\frac {3\,\sin \left (c+d\,x\right )\,b^2\,{\cos \left (c+d\,x\right )}^4}{2}+\frac {\sin \left (c+d\,x\right )\,b^2\,{\cos \left (c+d\,x\right )}^2}{2}+\sin \left (c+d\,x\right )\,b^2\right )}{15\,d} \]